<%@ page import="clienteWeb.ControladorWeb"%>
<%@ page import="beans.MozoBean"%>
<%@ page import="beans.MesaBean"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
  <title>Insert title here</title>
  
  <script type="text/javascript">
	function validarForm(){
		if(document.getElementById("comboMesas").value == ""){
			alert('Debe ingresar una Mesa.');
			return false;
		}
		document.getElementById("formulario").submit();
	}
</script>
</head>

<body>

<div>
<h2>Generar Comanda</h2>
</div>

<form name="frmGenerarComanda" id="formulario" method="GET" action="Comanda">

  <blockquote>
    <p>Mesa: 
    <select name="cbMesas" size="1" style="width: 117px; height: 28px">
       		<% for (MesaBean m : ControladorWeb.getInstancia().getMesasPorEstado("ocupada")) { %>
			            <option value="<%=m.getNumero() %>">
			            	<%=m.getNumero() %>			            
			            </option>
					<% } %>
    </select>
    <input type="button" id="btnCrearComanda" name="btnCrearComanda" value="Crear Comanda" class="buttons_aplicar" onclick=" crearComanda()" style="width: 195px; height: 27px">
     </p>
     
     	<script type="text/javascript">
		function crearComanda() 
		{
		document.getElementById("formulario").submit();	
		};
		function agregarItem() 
		{
			document.location.href("AgregarItemComanda.jsp");	
		};
	</script>
	
     

<form name="frmAgregarItemComanda" id="formulario2" method="GET" action="AgregarItemComanda" >
 <a href="" onclick="javascript:agregarItem();"></a>    

 
    </form>

    <p>
     </p>
  </blockquote>
</form>




<div id="cont" class="container">

<div class="button_div">
<input type="reset" id="btnCancel" name="btnCancel" value="Cancelar" class="buttons_CANCEL" onclick="xajax_cancelar();">

</div>
 

</div>

</br>
<a href='menu.jsp'>volver al menu</a>
</body>
</html>
